# coding: utf-8
from  mysql import connector

class DBTest(object):
    def __init__(self):
        super(DBTest, self).__init__()
        self.host='127.0.0.1'
        self.port='3306'
        self.user = 'root'
        self.password = '123456'
        self.database = 't_practice'

    def insert(self):
        pass
        item =['sad', 'asd1', '4dfssfd', 'asdd', 'asd', '90123']
        conn = connector.connect(host=self.host, port=self.port, user=self.user, password=self.password, database=self.database)
        cusor = conn.cursor()
        cusor.execute("insert into t_Movie(image, local_path, name, description, start, comment) VALUES (%s,%s,%s,%s,%s,%s)", item)
        conn.commit()
        conn.close()



if __name__ == '__main__':
    pass
    db = DBTest()
    db.insert()